﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace MusicLine
{
    public class MusicLineController
    {
        #region Roles and Users
        public static bool ValidateUser(string UserLogonId, string UserPassword)
        {
            return SystemSecurity.ValidateUser(UserLogonId, UserPassword);
        }

        public static string[] GetUserRoles(string UserLogonId)
        {
            return SystemSecurity.GetUserRoles(UserLogonId);
        }
        #endregion

        #region Cuts and Albums
        public static DataSet GetAllCutsAndAlbums()
        {
            return Cuts.GetAllCutsAndAlbums();
        } // end of GetAllCutsAndAlbums()

        public static DataSet GetAllCuts()
        {
            return Cuts.GetAllCuts();
        } // end of GetAllCuts()

        public static DataSet LookupCuts(String Title)
        {
            return Cuts.LookupCuts(Title);
        } // end of LookupCuts()

        public static DataSet LookupCutsByArtist(string ArtistName)
        {
            return Cuts.LookupCutsByArtist(ArtistName);
        } // end of LookupCutsByArtist()

        // TODO: Fix by adding the AlbumId (to uniquely identify the cut)
        public static void UpdateCut(int albumId, int cutNumber, string title, int lengthInSeconds)
        {
            Cuts.Update(albumId, cutNumber, title, lengthInSeconds);
        }
        #endregion
    } // end of class
} // end of namespace
